package com.ai.trickycards.entity.enumeration

/**
 * 扑克牌点数枚举
 */
enum class PokerRankEnum(
    val text: String,
    val num: Int,
    val fullText: String
) {
    Joker("JOKER", 0, "joker"),
    Rank2("2", 2, "2"),
    Rank3("3", 3, "3"),
    Rank4("4", 4, "4"),
    Rank5("5", 5, "5"),
    Rank6("6", 6, "6"),
    Rank7("7", 7, "7"),
    Rank8("8", 8, "8"),
    Rank9("9", 9, "9"),
    RankT("T", 10, "ten"),
    RankJ("J", 11, "jack"),
    RankQ("Q", 12, "queen"),
    RankK("K", 13, "king"),
    RankA("A", 14, "ace");

    companion object {

        fun valueOfText(text: String): PokerRankEnum {
            return PokerRankEnum.values().find { it.text == text }!!
        }

        fun valueOfNum(num: Int): PokerRankEnum {
            return PokerRankEnum.values().find { it.num == num }!!
        }


    }
}